package com.serkol.ams.controller.api;

import cn.binarywang.wx.miniapp.api.WxMaService;
import com.serkol.ams.bean.MyPageOld;
import com.serkol.ams.bean.Result;
import com.serkol.ams.service.UsersService;
import com.serkol.ams.service.UsersWalletIntegralLogService;
import com.serkol.annotation.IsLogin;
import com.serkol.component.SystemSettingUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("api/users/integral")
public class UsersIntegralApiController {


    @Autowired
    private UsersService userService;

    @Autowired
    private UsersWalletIntegralLogService walletIntegralLogService;



    @Autowired
    private SystemSettingUtils systemSettingUtils;



    @Autowired
    private WxMaService wxMaService;




    @IsLogin
    @GetMapping("/findByList")
    @ResponseBody
    public Result findByList(@RequestParam(name = "pageSize", defaultValue = "10") int pageSize, @RequestParam(name = "current", defaultValue = "0") int current, @RequestParam(name = "state", defaultValue = "0") int state, @RequestParam(name = "userId", defaultValue = "0") long userId) {

       return walletIntegralLogService.findByBackLogList(pageSize,current, state, 0);


    }


}
